﻿namespace SamdomBasicCalculator 

open System

(* Cameron Frederick -> @cammcad 
   There is no error detection to make the code easier to reason about,
   this code does not guard against the case of num1 and num2 being set to " " -> empty string *)
module SamDomCalculator = 
    
    (* Sum Operation *)
    let add num1 num2 = 
        (* Process *)
        let result = Double.Parse(num1)  + Double.Parse(num2)
        sprintf "The sum is:      %A" result

    (* Difference Operation *)
    let subtract num1 num2 = 
        (* Process *)
        let result = Double.Parse(num1)  -  Double.Parse(num2)
        sprintf "The difference is:      %A" result

    (* Product Operation *)
    let multiply num1 num2 = 
        (* Process *)
        let result = Double.Parse(num1)  *  Double.Parse(num2)
        sprintf "The prodcut is:      %A" result


    (* Quotient Operation *)
    let divide num1 num2 = 
        (* Process *)
        let result = Double.Parse(num1)  /  Double.Parse(num2)
        sprintf "The quotient is:      %A" result
